<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="Mock,com.anywebcam.mock.Mock,ignoreMissing,traceMissing,addEventListener,dispatchEvent,expect,hasEventListener,invokeMethod,method,property,removeEventListener,toString,verify,willTrigger" name="keywords">
<title>com.anywebcam.mock.Mock</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Mock - mock-as3 API Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">mock-as3 API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/anywebcam/mock/Mock.html&amp;com/anywebcam/mock/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Mock</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Mock"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.anywebcam.mock</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public dynamic  class Mock</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Mock <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.utils.Proxy</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td>flash.events.IEventDispatcher</td>
</tr>
</table>
<p></p>
  Mock and MockExpectation provide the core API of mock-as3. 
  
  <p></p>
<br>
<span class="label">Example</span>
<br>In general usage an instance of Mock will be created and used to specify which methods and properties are expected to be called on an object.
   <div class='listing'><pre>
   // set an expectation
   mock.method('hello').withArgs(String).andReturn('hi!').once;
   // call the method
   mock.hello('with a string');
   // check that all the expectations were met
   mock.verify();
  </pre></div>
  
  <p></p>In order to make Mock Objects work as stand-ins for real objects they need to implement an interface or extend a class and override every method. Here we are going to create a Mock IImageEncoder because we want to test another object that uses an IImageEncoder instead of testing the actual encoding.
  <div class='listing'><pre>
   package {
  
     import com.anywebcam.mock.Mock;
     import flash.display.BitmapData;
     import flash.utils.ByteArray;
     import mx.graphics.codec.IImageEncoder;
  
     public class MockImageEncoder implements IImageEncoder {
       public var mock:Mock;
  
       public function MockImageEncoder() {
         mock = new Mock();
       }
  
       public function get contentType():String {
         return mock.contentType;
       }
  
       public function encode(bitmapData:BitmapData):ByteArray {
         return mock.encode(bitmapData);
       }
     
       public function encodeByteArray(byteArray:ByteArray, width:int, height:int, transparent:Boolean = true):ByteArray {
         return mock.encodeByteArray(byteArray, width, height, transparent);
       }
     }
   }
  </pre></div>
  
  Now we can use our MockImageEncoder in our tests.
  
  <div class='listing'><pre>
   public function testGrabsImageAndCallEncode():void {
  
     // create the data our class under test will use
     var sprite:Sprite = new Sprite();
     var bytes:ByteArray = new ByteArray();
     var imageEncoder:MockImageEncoder = new MockImageEncoder();
     
     // set expectations for the mocks
     imageEncoder.mock.method('encode').withArgs(BitmapData).andReturn(bytes);
     
     // test our class
     var screenGrabber:ScreenGrabber = new ScreenGrabber(sprite, imageEncoder);
     var encoded:ByteArray = screenGrabber.grab();
  
     // check results
     assertEquals("expecting screenGrabber to return the ByteArray from imageEncoder", bytes, encoded);
  
     // check mock expectations were met
     imageEncoder.mock.verify();
   }
  </pre></div>
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="MockExpectation.html" target="">MockExpectation for examples of how to set various expectations.</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#ignoreMissing">ignoreMissing</a> : Boolean<div class="summaryTableDescription">
   Indicates whether methods and properties without expectations are ignored.</div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#traceMissing">traceMissing</a> : Boolean<div class="summaryTableDescription">
   When #ignoreMissing is true, indicates whether methods and properties without expectations are recorded using trace().</div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Mock()">Mock</a>(target:Object = null, ignoreMissing:Boolean = false)</div>
<div class="summaryTableDescription">
   Constructor
   
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addEventListener()">addEventListener</a>(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void</div>
<div class="summaryTableDescription">
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#dispatchEvent()">dispatchEvent</a>(event:Event):Boolean</div>
<div class="summaryTableDescription">
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#expect()">expect</a>():<a href="../mock/MockExpectation.html">MockExpectation</a>
</div>
<div class="summaryTableDescription">
   Create an expectation on this Mock
      </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#hasEventListener()">hasEventListener</a>(type:String):Boolean</div>
<div class="summaryTableDescription">
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#invokeMethod()">invokeMethod</a>(propertyName:String, args:Array = null):*</div>
<div class="summaryTableDescription">
   Invoke an expected method on the Mock.</div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#method()">method</a>(methodName:String):<a href="../mock/MockExpectation.html">MockExpectation</a>
</div>
<div class="summaryTableDescription">
   Shortcut for creating a Method Expectation
   
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#property()">property</a>(propertyName:String):<a href="../mock/MockExpectation.html">MockExpectation</a>
</div>
<div class="summaryTableDescription">
   Shortcut for creating a Property Expectation
   
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeEventListener()">removeEventListener</a>(type:String, listener:Function, useCapture:Boolean = false):void</div>
<div class="summaryTableDescription">
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
   String representation of this Mock
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#verify()">verify</a>():Boolean</div>
<div class="summaryTableDescription">
   Verify all the expectations have been met
   
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#willTrigger()">willTrigger</a>(type:String):Boolean</div>
<div class="summaryTableDescription">
   </div>
</td><td class="summaryTableOwnerCol">Mock</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="ignoreMissing"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ignoreMissing</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>ignoreMissing:Boolean</code>&nbsp;&nbsp;[read-write]<p>
   Indicates whether methods and properties without expectations are ignored.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get ignoreMissing():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set ignoreMissing(value:Boolean):void</code>
<br>
</div>
<a name="traceMissing"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">traceMissing</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>traceMissing:Boolean</code>&nbsp;&nbsp;[read-write]<p>
   When #ignoreMissing is true, indicates whether methods and properties without expectations are recorded using trace().
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get traceMissing():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set traceMissing(value:Boolean):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Mock()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Mock</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Mock(target:Object = null, ignoreMissing:Boolean = false)</code><p>
   Constructor
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The target that is delegating calls to this Mock
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">ignoreMissing</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Indicates whether methods and properties without expectations are ignored
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addEventListener()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addEventListener</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void</code><p>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">listener</span>:Function</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">useCapture</span>:Boolean</code> (default = <code>false</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">priority</span>:int</code> (default = <code>0</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">useWeakReference</span>:Boolean</code> (default = <code>false</code>)<code></code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">flash.events.IEventDispatcher.addEventListener</div>
</div>
<a name="dispatchEvent()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dispatchEvent</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function dispatchEvent(event:Event):Boolean</code><p>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">flash.events.IEventDispatcher.dispatchEvent</div>
</div>
<a name="expect()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">expect</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function expect():<a href="../mock/MockExpectation.html">MockExpectation</a></code><p>
   Create an expectation on this Mock
      </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../mock/MockExpectation.html">MockExpectation</a></code> &mdash; 
                        MockExpectaton A new MockExpectation instance
   
                        
                     </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../mock/Mock.html#method()" target="">method()</a>
<br>
<a href="../mock/Mock.html#property()" target="">property()</a>
</div>
<br>
<span class="label">Example</span>
<br>   <div class='listing'><pre>
    mock.expect().method('methodName');
   </pre></div>
   <p></p>
</div>
<a name="hasEventListener()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">hasEventListener</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function hasEventListener(type:String):Boolean</code><p>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">flash.events.IEventDispatcher.hasEventListener</div>
</div>
<a name="invokeMethod()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">invokeMethod</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function invokeMethod(propertyName:String, args:Array = null):*</code><p>
   Invoke an expected method on the Mock. 
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">propertyName</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">args</span>:Array</code> (default = <code>null</code>)<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code></td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br>In order to handle ...rest parameters properly the Mock delegate classes need to be implemented as per the following example.
   <div class='listing'><pre>
   public function methodWithRestArgs(a:Parameter, b:Parameter, ...rest):ReturnType {
    return mock.invokeMethod('methodWithRestArgs', [a, b].concat(rest));
   }
   </pre></div>
   <p></p>
</div>
<a name="method()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">method</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function method(methodName:String):<a href="../mock/MockExpectation.html">MockExpectation</a></code><p>
   Shortcut for creating a Method Expectation
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">methodName</span>:String</code> &mdash; The name of the target method to mock
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../mock/MockExpectation.html">MockExpectation</a></code> &mdash; 
                        MockExpectation A new MockExpectation instance
   
                        
                     </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br>   <div class='listing'><pre>
   mock.method('methodName');
   </pre></div>
   <p></p>
</div>
<a name="property()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">property</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function property(propertyName:String):<a href="../mock/MockExpectation.html">MockExpectation</a></code><p>
   Shortcut for creating a Property Expectation
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">propertyName</span>:String</code> &mdash; The name of the target property to mock
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../mock/MockExpectation.html">MockExpectation</a></code> &mdash; 
                        MockExpectation A new MockExpectation instance  
   
                        
                     </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br>   <div class='listing'><pre>
   mock.property('propertyName');
   </pre></div>
   <p></p>
</div>
<a name="removeEventListener()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeEventListener</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void</code><p>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">listener</span>:Function</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">useCapture</span>:Boolean</code> (default = <code>false</code>)<code></code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">flash.events.IEventDispatcher.removeEventListener</div>
</div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toString():String</code><p>
   String representation of this Mock
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code></td>
</tr>
</table>
</div>
<a name="verify()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">verify</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function verify():Boolean</code><p>
   Verify all the expectations have been met
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if all expectations are met
   </td>
</tr>
</table>
<br>
<span class="label">Throws</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code></code> &mdash; with results of failed expectations
   </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br>   <div class='listing'><pre>
   mock.verify();
   </pre></div>
   <p></p>
</div>
<a name="willTrigger()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">willTrigger</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function willTrigger(type:String):Boolean</code><p>
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">flash.events.IEventDispatcher.willTrigger</div>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
